STEP 7: Let's make things tricky by adding gravity to our stage, which will make the net bounce up and down.

  • Click to open that section of the toolkit.
  • Drag Set Gravity into your program.
  • Drag Sprite Gravity Off into your program. This stops your sprite from falling.
  • Click Run to see your work. Click Submit and Next to move on.

To navigate the page using the TAB key, first press ESC to exit the code editor.

stage.set_background("halfcourt") sprite = codesters.Sprite("player1") sprite.go_to(-175, -150) net = codesters.Sprite("basketballnet") net.go_to(215, 175)
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)